function MyCanvas(id, w, h) 
{
	this.layer = new Kinetic.Layer();

	this.stage = new Kinetic.Stage(
	{
        container: id,
        width: w,
        height: h
    });

    this.stage.add(this.layer);

	this.AddControl = function(controlObj)
	{
		var control = controlObj.GetControl();
		this.layer.add(control);	
		control.moveToTop();
		this.stage.draw();
	}
	
	this.RemoveControl = function(controlObj) 
	{
		var control = controlObj.GetControl();
		this.layer.remove("#" + controlObj.GetProperty("ID"));
		this.stage.draw();
	}

	this.HideControl = function(controlObj)
	{
		var control = controlObj.GetControl();
		control.hide();
		this.stage.draw();
	}

	this.ShowControl = function(controlObj)
	{
		var control = controlObj.GetControl();
		control.show();
		this.stage.draw();
	}

	this.HideAll = function()
	{
		//this.layer.hide();
		this.stage.draw();
	}
	
	this.Draw = function() 
	{
		this.stage.draw();
	}
	
}